package  
{
	import net.flashpunk.Entity;
	import net.flashpunk.graphics.Spritemap;
	import net.flashpunk.Sfx;
	import net.flashpunk.FP;
	
	/**
	 * ...
	 * @author Donatello
	 */
	public class ExplosionSmall extends Entity
	{
		
		[Embed(source = "img/smalExplosionSheet.png" )] private const ANIM:Class;
		private var anim:Spritemap;	
		
		private var time:Number=0.0;
		
		public function ExplosionSmall(px:Number,py:Number) 
		{
			anim = new Spritemap(ANIM, 16, 16);
			anim.add("explode", [0, 1, 2],10, false);
			
			anim.scale = 3;
			
			graphic = anim;
			
			
			x = px;
			y = py;
			
			anim.play("explode");
			
		}
		
		override public function update():void
		{
			time += FP.elapsed;
			
			if (time > 0.3)
				FP.world.remove(this);
			
		}
		
		
		
	}

}